﻿using System;

namespace crc32
{
    public static class ConsolePlus
    {
         public static void WriteLineRed(string input, params object[] args)
         {
             WriteLineColor(ConsoleColor.Red, input, args);
         }         
        
        public static void WriteLineGreen(string input, params object[] args)
         {
             WriteLineColor(ConsoleColor.Green, input, args);
         }        
        
        public static void WriteLineYellow(string input, params object[] args)
         {
             WriteLineColor(ConsoleColor.Yellow, input, args);
         }        
        
        public static void WriteLineBlack(string input, params object[] args)
         {
             WriteLineColor(ConsoleColor.Black, input, args);
         }

        private static void WriteLineColor(ConsoleColor color, string input, params object[] args)
        {
            var oldColor = Console.ForegroundColor;
            Console.ForegroundColor = color;
            Console.WriteLine(input, args);
            Console.ForegroundColor = oldColor;
        }
    }
}